//
//  XSPieView.h
//  Test
//
//  Created by xueshan1 on 2018/12/14.
//  Copyright © 2018 xueshan1. All rights reserved.
//
//可参考  https://www.jianshu.com/p/e47adddc6308

#import <UIKit/UIKit.h>
#import "XSPieViewModel.h"

NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, XSPieViewType) {
    XSPieViewType_Circular, //环形图
    XSPieViewType_Pie  //饼状图
};

/**
 饼状图
 */
@interface XSPieView : UIView


@property(nonatomic,assign)XSPieViewType viewType;
@property(nonatomic,assign)CGFloat outCircleRaidus; //大圆半径
@property(nonatomic,assign)CGFloat arcWidth; //环宽度(饼可以不设置)
@property(nonatomic,assign)BOOL canClick; //default YES;

@property(nonatomic,assign)CGFloat arcRaidus;

- (id)initWithFrame:(CGRect)frame viewType:(XSPieViewType)type;
- (void)drawPieViewWithDataSource:(NSArray<XSPieViewModel *> *)dataSource;

@end

NS_ASSUME_NONNULL_END
